function match_hidden_all

ns_im =    [1,2,3;...
            1,2,4;...
            1,2,5;...
            1,2,6;...
            1,3,4;...
            1,3,5;...
            1,3,6;...
            1,4,5;...
            1,4,6;...
            1,5,6;...
            2,3,4;...
            2,3,5;...
            2,3,6;...
            2,4,5;...
            2,4,6;...
            2,5,6;...
            3,4,5;...
            3,4,6;...
            3,5,6;...
            4,5,6];
%         
% ns_im = [1 2 3 4;...
%         1 2 3 5;...
%         1 2 3 6;...
%         1 2 4 5;...
%         1 2 4 6;...
%         1 2 5 6;...
%         1 3 4 5;...
%         1 3 4 6;...
%         1 3 5 6;...
%         1 4 5 6;...
%         2 3 4 5;...
%         2 3 4 6;...
%         2 3 5 6;...
%         2 4 5 6;...
%         3 4 5 6];
        
        
% for i = 1:6
%     for j = 1:6
%         if (i ~= j)
%             for k = 1:6
%                 if (i ~= j && j ~= k && i ~= k)
%                     for l = 1:6
%                         if (i ~= j && j ~= k && i ~= k && i ~= l && j ~= l && k ~= l)
%                             ns_im = [ns_im; i j k l];
%                         end
%                     end
%                 end
%             end
%         end
%     end
% end            
        
correct = 0;
incorrect = 0;
inc_hidden = 0;
not_found_hidden = 0;
tot_hidden = 0;
res_re_avg = zeros(3,4)
res_ren_avg = zeros(3,4) 
percent_all = [];
counter = 0;

for i = 1:size(ns_im, 1)            
    ns_im(i,:)
    [correct_count incorrect_count incorrect_hidden not_found total_hidden res_re res_ren] = match_seeds_hidden(ns_im(i,:), 55, 'Dewarped\Dataset_2\', 4);     
%     percent_all = [percent_all; correct_count / (correct_count + incorrect_count)];
%     save(strcat('Results\40_seeds_4_imgs\3_3pix_individual_percent.txt'), 'percent_all', '-ASCII');
    correct = correct + correct_count;
    incorrect = incorrect + incorrect_count;
    inc_hidden = inc_hidden + incorrect_hidden;
    not_found_hidden = not_found_hidden + not_found;
    tot_hidden = tot_hidden + total_hidden;
    if (incorrect_count ~= 0)
        counter = counter + 1;
    end
    res_re
    res_ren
    res_re_avg = res_re_avg + res_re;
    res_ren_avg = res_ren_avg + res_ren;
end
% 
percentage = correct / (correct + incorrect)
hidden_percentage = (tot_hidden - not_found - inc_hidden) / tot_hidden
res_re_fixed = [res_re_avg(1:2,:) ./ size(ns_im, 1); res_re_avg(3,:) ./ counter]
res_re_avg = res_re_avg ./ size(ns_im, 1)
% res_ren_fixed = [res_ren_avg(1:2,:) ./ size(ns_im, 1); res_ren_avg(3,:) ./ counter]
res_ren_avg = res_ren_avg ./ size(ns_im, 1)
1
% save(strcat('Results\40_seeds_4_imgs\3_3pix_incorrect.txt'), 'incorrect', '-ASCII');
% save(strcat('Results\40_seeds_4_imgs\3_3pix_correct.txt'), 'correct', '-ASCII');
% save(strcat('Results\40_seeds_4_imgs\3_3pix_inc_hidden.txt'), 'inc_hidden', '-ASCII');
% save(strcat('Results\40_seeds_4_imgs\3_3pix_not_found_hidden.txt'), 'not_found_hidden', '-ASCII');
% save(strcat('Results\40_seeds_4_imgs\3_3pix_tot_hidden.txt'), 'tot_hidden', '-ASCII');
% save(strcat('Results\40_seeds_4_imgs\3_3pix_res_re_avg.txt'), 'res_re_avg', '-ASCII');
% save(strcat('Results\40_seeds_4_imgs\3_3pix_res_ren_avg.txt'), 'res_ren_avg', '-ASCII');
% save(strcat('Results\40_seeds_4_imgs\3_3pix_percentage.txt'), 'percentage', '-ASCII');
% save(strcat('Results\40_seeds_4_imgs\3_3pix_hidden_percentage.txt'), 'hidden_percentage', '-ASCII');